package com.oromwin.repos.server;

import com.oromwin.repos.common.Server;
import com.oromwin.repos.common.Server.LockType;

public class LockObject {
    private LockType _lockType = null;
    private String _fileId = null;

    public LockObject(LockType lockType, String fileId) {
        if (fileId == null) {
            fileId = Server.UniqueId.generate();
        }
        _lockType = lockType;
        _fileId = fileId;
    }

    public LockType getLockType() {
        return _lockType;
    }

    public String getFileId() {
        return _fileId;
    }

    public String toString() {
        return "{'" + _lockType + "', '" + _fileId + "'}";
    }

}
